package cn.netjava.personblogaction;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import cn.netjava.actioninterface.Action;
import cn.netjava.dao.PhotoDao;
import cn.netjava.pojo.Photo;
/**
 * this action is use for dealing with my person photo column
 * @author Administrator
 *
 */
public class PersonPhotoAction implements Action{

	public String excute(HttpServletRequest request,
			HttpServletResponse response) {
		
		int albumID =Integer.parseInt(request.getParameter("albumid"));	
		System.out.println("albumID:"+albumID);
		PhotoDao pdao =PhotoDao.getPhotoDao();
		List<Photo> photoList = pdao.getAllPhotoFromAlbumID(albumID);
		System.out.println("photoList:"+photoList);
		request.setAttribute("userPhotoAlbumPhotos", photoList);
		
		return "JSP/personblogjsp/personphoto.jsp";
	}

}
